package com.qf.function.controller;/*
*王浩政 
*whz
2022/9/6
11:59
*小米商城
*/

import com.qf.pojo.User;

import java.util.function.Consumer;
import java.util.function.Supplier;

public class UserController {
    public void proccessUser(Consumer<User> userConsumer){
        User user=new User();
        user.setName("孙悟空");
        user.setAddress("花果山");
        user.setAge(500);
        userConsumer.accept(user);
    }

    public void processUser(Supplier<User>userSupplier){
        User user=userSupplier.get();
        String name =user.getName();
        System.out.println(name.toLowerCase());
    }

}
